<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />

    <link rel="Bookmark" href="/favicon.ico" >
    <link rel="Shortcut Icon" href="/favicon.ico" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/static/h-ui/css/H-ui.min.css?V={{:config('STATIC_VERSION')}}" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/static/h-ui.admin/css/H-ui.admin.css?V={{:config('STATIC_VERSION')}}" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/lib/Hui-iconfont/1.0.8/iconfont.css?V={{:config('STATIC_VERSION')}}" />
    <link rel="stylesheet" type="text/css" href="__STATIC__/static/h-ui.admin/skin/default/skin.css?V={{:config('STATIC_VERSION')}}" id="skin" />


    <script type="text/javascript" src="__STATIC__/lib/jquery/1.9.1/jquery.min.js?V={{:config('STATIC_VERSION')}}"></script>
    <script type="text/javascript" src="__STATIC__/lib/layer/2.4/layer.js?V={{:config('STATIC_VERSION')}}"></script>
    <script type="text/javascript" src="__STATIC__/static/h-ui/js/H-ui.min.js?V={{:config('STATIC_VERSION')}}"></script>
    <script type="text/javascript" src="__STATIC__/static/h-ui.admin/js/H-ui.admin.js?V={{:config('STATIC_VERSION')}}"></script>
    <link href="__STATIC__layui/css/layui.css" rel="stylesheet">
    <script type="text/javascript" src="__STATIC__/layui/layui.all.js?V={{:config('STATIC_VERSION')}}"></script>
    <link rel="stylesheet" href="__STATIC__/static/css/menu.css">


    <script>
        //由于模块都一次性加载，因此不用执行 layui.use() 来加载对应模块，直接使用即可：
        ;!function(){
            var layer = layui.layer
                ,form = layui.form;
        }();
    </script>
    <!--先引入layer库-->
    <script type="text/javascript" src="__STATIC__/static/js/common.js?V={{:config('STATIC_VERSION')}}"></script>
    <title>管理后台</title>
    <style>
        html,body{
            overflow: hidden;
        }
        .contextMenu{
            display: none !important;
        }
    </style>
</head>
<body>


{include file="common/menu" }
<div class="dislpayArrow hidden-xs"><a class="pngfix" href="javascript:void(0);" onClick="displaynavbar(this)"></a></div>
<section class="Hui-article-box">
    <div id="Hui-tabNav" class="Hui-tabNav hidden-xs" style="display: none;">
        <div class="Hui-tabNav-wp" style="display: none;">
            <ul id="min_title_list" class="acrossTab cl" style="display: none;">
                <li class="active">
                    <span title="我的桌面" data-href="{{:url('/overview','',false)}}">我的桌面</span>
                    <em></em>
                </li>
            </ul>
        </div>
        <div class="Hui-tabNav-more btn-group">
            <a id="js-tabNav-prev" class="btn radius btn-default size-S" href="javascript:;"><i class="Hui-iconfont">&#xe6d4;</i></a>
            <a id="js-tabNav-next" class="btn radius btn-default size-S" href="javascript:;"><i class="Hui-iconfont">&#xe6d7;</i></a>
        </div>
    </div>
    <div id="iframe_box" class="Hui-article">
        <div class="show_iframe">
            <div style="display:none" class="loading"></div>
            <iframe scrolling="yes" frameborder="0" src="{{:url('/overview','',false)}}"></iframe>
        </div>
    </div>
</section>

<div class="contextMenu" id="Huiadminmenu">
    <ul>
        <li id="closethis">关闭当前 </li>
        <li id="closeall">关闭全部 </li>
    </ul>
</div>
<!--提示框-->
<style>
    @-webkit-keyframes enter {
        0% {
            opacity: 0;
            top: -10px;
        }
        5% {
            opacity: 1;
            top: 0px;
        }
        50.9% {
            opacity: 1;
            top: 0px;
        }
        55.9% {
            opacity: 0;
            top: 10px;
        }
    }
    @keyframes enter {
        0% {
            opacity: 0;
            top: -10px;
        }
        5% {
            opacity: 1;
            top: 0px;
        }
        50.9% {
            opacity: 1;
            top: 0px;
        }
        55.9% {
            opacity: 0;
            top: 10px;
        }
    }
    @-moz-keyframes enter {
        0% {
            opacity: 0;
            top: -10px;
        }
        5% {
            opacity: 1;
            top: 0px;
        }
        50.9% {
            opacity: 1;
            top: 0px;
        }
        55.9% {
            opacity: 0;
            top: 10px;
        }
    }
    .mask{
        background: black;
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        opacity: 0.75;
        z-index: 9998;
        display: none;
    }

    .loader {
        position: absolute;
        left: 50%;
        top: 50%;
        margin-left: -27.5px;
        margin-top: -27.5px;
        z-index: 9999;
        display: none;
    }

    .square {
        background: white;
        width: 15px;
        height: 15px;
        float: left;
        top: -10px;
        margin-right: 5px;
        margin-top: 5px;
        position: relative;
        opacity: 0;
        -webkit-animation: enter 6s infinite;
        animation: enter 6s infinite;
    }

    .enter {
        top: 0px;
        opacity: 1;
    }

    .square:nth-child(1) {
        -webkit-animation-delay: 1.8s;
        -moz-animation-delay: 1.8s;
        animation-delay: 1.8s;
    }

    .square:nth-child(2) {
        -webkit-animation-delay: 2.1s;
        -moz-animation-delay: 2.1s;
        animation-delay: 2.1s;
    }

    .square:nth-child(3) {
        -webkit-animation-delay: 2.4s;
        -moz-animation-delay: 2.4s;
        animation-delay: 2.4s;
        background: #fdc96f;
    }

    .square:nth-child(4) {
        -webkit-animation-delay: 0.9s;
        -moz-animation-delay: 0.9s;
        animation-delay: 0.9s;
    }

    .square:nth-child(5) {
        -webkit-animation-delay: 1.2s;
        -moz-animation-delay: 1.2s;
        animation-delay: 1.2s;
    }

    .square:nth-child(6) {
        -webkit-animation-delay: 1.5s;
        -moz-animation-delay: 1.5s;
        animation-delay: 1.5s;
    }

    .square:nth-child(8) {
        -webkit-animation-delay: 0.3s;
        -moz-animation-delay: 0.3s;
        animation-delay: 0.3s;
    }

    .square:nth-child(9) {
        -webkit-animation-delay: 0.6s;
        -moz-animation-delay: 0.6s;
        animation-delay: 0.6s;
    }

    .clear {
        clear: both;
    }

    .last {
        margin-right: 0;
    }

</style>
<!--loading 按钮-->
<div class="mask"></div>
<div class="loader">
    <div class="square" ></div>
    <div class="square"></div>
    <div class="square last"></div>
    <div class="square clear"></div>
    <div class="square"></div>
    <div class="square last"></div>
    <div class="square clear"></div>
    <div class="square "></div>
    <div class="square last"></div>
</div>
<!--loading 按钮-->
<!--提示框函数-->
<script>
    function showLoading () {
        $('.loader,.mask').show();
    }
    function colseLoading () {
        $('.loader,.mask').hide();
    }
    let timer = null;

    function getEmpteLatAndLng () {

        timer = setTimeout(()=>{
            $.ajax({
                type: "POST",
                dataType: "json",
                url: "{{:url('/order/getEmptyLatAndLng')}}" ,
                data: {WareHouse:localStorage.getItem('WareHouse')},
                success: function (data) {
                    if(data.msg > 0 ){
                        setTimeout('getEmpteLatAndLng()',1000);
                    }else{
                        colseLoading();
                        clearTimeout(timer);
                    }
                },
                error : function() {}
            });
        },1000)
    }
</script>
<script>
    function loadOrderFromSap()
    {
        let wareHouse = localStorage.getItem('WareHouse');
        $.ajax({
            type: "get",
            dataType: "json",
            url: "{{:url('/order/load')}}?WareHouse="+wareHouse ,
            data: {},
            success: function (data) {
                showLoading();
                getEmpteLatAndLng();
            },
            error : function() {}
        });
    }
    $('#LocationCode').change(function(){
        let v = $(this).val();
        localStorage.setItem('WareHouse' , v);
        loadOrderFromSap();
    });
    //打开新的标签页 跳到排单页面
    function goAssign() {
        let wareHouse = localStorage.getItem('wareHouse');
        if( wareHouse==0 || wareHouse == null)
        {
            alert('请选择仓库')
            return false;
        }
        let rul=`{{:url('/tms/router')}}?wareHouse=${wareHouse}`;
        let a = $(`<a href='${rul}' target='_blank'></a>`).get(0);
        let e = document.createEvent('MouseEvents');
        e.initEvent('click', true, true);
        a.dispatchEvent(e);

    }
    $(function () {
       // let v = localStorage.getItem('WareHouse');
      //  $('#LocationCode').find("option[value='"+v+"']").attr('selected' , true)
    });
</script>
{include file="common/footer" }